The present invention relates to a code reader adapted to read a one- or two-dimensional code pattern that is optically readably recorded or printed on a sheet-like recording medium such as paper.
More specifically, the present invention relates to optimization of the focusing state of the optical system in the code reader.
Conventionally, there have been a number of proposals for code readers, which are adapted to read a one- or two-dimensional code pattern, including a bar code, that is optically readably printed or recorded on a sheet-like recording medium such as paper.
Those code readers include a photosensor containing a line sensor or area sensor for converting outgoing light from the optical system into an electric signal and optically read a code pattern optically readably printed on a sheet-like recording medium. Also, a type of code reader has been proposed which optically reads the code pattern by manually scanning it with contact made with the recording medium.
A proposal has also been made by the assignee of this invention for a dot code which is a code pattern for printing multimedia information containing sound, video, text, and so on in an optically readable form onto a sheet-like recording medium and a code reader for optically reading that dot code (see published European application EP 0067555 A1, which corresponds to U.S. Ser. No. 08/407,018, now U.S. Pat. No. 5,896,403).
FIG. 18 shows the physical format of the code pattern disclosed in the aforementioned European application.
A dot code 100 is arranged in the form of a two-dimensional array of blocks 102. Each block is composed of a data dot pattern section 104, markers 106, and a block address pattern 108.
The data dot pattern section 104 contain a corresponding one of blocks of data into which, for example, sound information is divided. In the data dot pattern section 104 of each block, data are present as a dot pattern composed of white dots or black dots corresponding to 0 or 1 values of data. Note that grid lines shown in FIG. 18 are virtual lines.
The markers 106 are placed at four corners of each block and each comprised of a fixed number of contiguous black dots. These markers are used to find reference points for detecting data dots 110 in the data dot pattern section 104.
The block address pattern 108 is placed between the markers 106 so as to allow the identification of the corresponding one of the blocks 102. The block address pattern contains an error detecting or correcting code.
According to such a physical format of the dot code, even if the size of reflected light from the dot code at the light receiving surface of a solid-state image pickup device, such as a CCD, that is the photosensor of the code reader is larger than that of the light receiving surface, in other words, even if the entire dot code cannot be captured in one shot by the solid-state image pickup device, original data can be reconstructed from data of each block by capturing at least one block in one shot and reading its address, that is, by capturing the entire dot code in two or more shots.
Therefore, such a dot code system allows the storage of large amounts of data on a medium, such as paper, which is not feasible with conventionally known one- or two-dimensional code patterns and is expected to find various applications hitherto unexpected, such as the transfer of multimedia information through paper.
Since the code reader is operated manually to scan through a recording medium while contacting the medium, its end surface 112 may be tilted with respect to a recording medium 114 as shown in FIG. 19 or floated over the medium thought not shown. Namely, the end surface 112 of the code reader is not necessarily brought into contact with the recording medium 114 during the manual scanning of the code pattern in its entirety.
The code reader repeats an image capture operation periodically and concatenates image data obtained in a set of image capture operations, thereby allowing the entire code pattern to be read. When the distance between the code reader and the recording medium varies from time to time owing to tilting or floating of the code reader, it becomes difficult to concatenate image data. That is, the occurrence of floating or tilting of the code reader may result in a failure to read the code pattern accurately.
In order to allow accurate manual reading by resolving those problems, there have been an approach to increase the depth of focus by stopping down the lens aperture and an approach to use autofocus systems as used in video cameras and so on.
With the former approach, it is required to replace the light source used with a brighter one because, when the lens aperture is stopped down, the amount of illumination light is correspondingly reduced. This will impose a heavier burden on the illumination system than is necessary. The latter case, while it is possible to provide images of fixed contrast even if the distance to the recording medium varies, results in an increase in the size, complexity, and cost of the device.
It is therefore an object of the present invention to provide a code reader which, without suffering from an increase in cost and size, allows a code pattern to be captured as accurately as possible for preventing read errors even when the code reader has its contact surface tilted relative to or floated over a recording medium in manually scanning the code pattern.
According to an aspect of the present invention, there is provided a code reader which is used with a sheet-like recording medium on which data are recorded as an optically readable code pattern and optically reads the code pattern while being in contact with the recording medium and being manually moved over the code pattern, comprising: an optical system for forming an optical image of the code pattern recorded on the recording medium on a photosensor; and the photosensor for converting the optical image formed by the optical system into an electrical signal, wherein a modulation transfer function (MTF) best position on a subject-side of the optical system at a spatial frequency corresponding to the code pattern is set to be present at a given distance from the surface of the code reader with the recording medium.
Here, the MTF in an optical system is the ratio of image contrast to object contrast at a certain spatial frequency. In other words, the MTF best position can also be the to be the position in which the image contrast becomes maximum, or the position in which the image is best focused.
That is, the code reader according to this aspect of the present invention is characterized in that, when the code pattern is present in the position which is at a given distance from the code reader surface of contact with the recording medium, the image of the code pattern formed on the photosensor becomes maximum in contrast.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.